-
Notifications
You must be signed in to change notification settings - Fork 1
Convert Custom Test Tasks to Modern Test Suites for Gradle 9 Compatibility #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@trask 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
Co-authored-by: trask <[email protected]>
Co-authored-by: trask <[email protected]>
Co-authored-by: trask <[email protected]>
Co-authored-by: trask <[email protected]>
|
@copilot you need to rebase this also you missed lots of gradle files that still need conversion |
Co-authored-by: trask <[email protected]>
Co-authored-by: trask <[email protected]>
Co-authored-by: trask <[email protected]>
Working on both requests:
Converting netty-4.0 now in commit c00a512. Will batch additional conversions and then handle rebase. |
…estSuite Co-authored-by: trask <[email protected]>
Co-authored-by: trask <[email protected]>
…us update Co-authored-by: trask <[email protected]>
This PR migrates custom Test tasks registered with
by registering(Test::class)to modern Test Suites usingby registering(JvmTestSuite::class)to ensure compatibility with Gradle 9.Problem
After upgrading to Gradle 9, custom Test tasks registered with
by registering(Test::class)are being marked as "NO-SOURCE" and failing to execute tests. This is due to Gradle 9's new requirement that Test tasks must have explicit test source configuration.Solution
Instead of applying workarounds to custom Test tasks, this PR migrates to Gradle's modern Test Suites approach. The migration converts:
Before:
After:
testing { suites { val testStableSemconv by registering(JvmTestSuite::class) { targets { all { testTask.configure { jvmArgs("-Dotel.semconv-stability.opt-in=database") systemProperty("collectMetadata", collectMetadata) } } } } } } tasks { check { dependsOn(testing.suites.named("testStableSemconv")) } }Files Converted
This PR converts 39 build files (41% of the total 95 files that need conversion):
Complex Cases Handled
Successfully migrated complex scenarios including:
testingblocks (spring-boot-autoconfigure, influxdb-2.4, jms-1.1)Verification
All converted files have been validated:
Remaining Work
This establishes the working migration pattern with 41% completion. The remaining 56 files can be converted using the same approach, with some requiring individual attention for complex existing
testingblocks or non-standard test patterns.Addressing #68.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.